package com.schooldate.util.push;

import com.gexin.rp.sdk.template.TransmissionTemplate;

import java.util.Date;

/**
 *
 * Created by etund on 2015/5/3 0003.
 */
public class BasePush {
    protected static final String APPID = "2dCCkiuJhq9VHQS1WkrtoA";
    protected static final String APPKEY = "cWwPq04ZDd8R4WCxe1oRF4";
    protected static final String MASTERSECRET = "5bQx1t1DxG7Hj8zsKO0ge9";
//    protected static final String CLIENTID = "f8b14fc288a21bc3d675190e9a4db0a4";
//    protected static final String devicetoken =  "42b74bacb28414c856505e2e6d70fe7940540a8c8fa4c728b3338c9ec1575367";
//    protected static final String API = "http://sdk.open.api.igexin.com/apiex.htm";     //OpenService接口地址

    protected static String getDate(){
        Date date = new Date();
        return date.toLocaleString();
    }

    protected static TransmissionTemplate TransmissionTemplateDemo() throws Exception{
        TransmissionTemplate template = new TransmissionTemplate();
        template.setAppId(APPID);
        template.setAppkey(APPKEY);
        // 透传消息设置，1为强制启动应用，客户端接收到消息后就会立即启动应用；2为等待应用启动。
        template.setTransmissionType(1);
        template.setTransmissionContent("测试测试");

    /*iOS 推送需要对该字段进行设置具体参数详见iOS模板说明*/

//        template.setPushInfo(actionKey, badge, message, sound)
    /*template.setPushInfo("actionLocKey", 4, "message", "sound",
    "payload", "locKey", "locArgs", "launchImage","ContentAvailable");*/
        System.out.println(template+"============");
        return template;
    }
}
